<template>
  <div>
    <ThrElement v-if="sysInfo" :info="sysInfo"/>
    <Judiciary v-if="sfInfo" :info="sfInfo"/>
    <Misconduct v-if="blInfo" :info="blInfo"/>
  </div>
</template>
<script>
  import ThrElement from "@/views/system/beidiao/report/ThrElement.vue"
  import Judiciary from "@/views/system/beidiao/report/Judiciary.vue"
  import Misconduct from "@/views/system/beidiao/report/Misconduct.vue"

  import {report} from "@/api/system/beiDiao"

  export default {
    name: "grfx_ptb",
    components: {
      ThrElement,
      Judiciary,
      Misconduct
    },
    props: {
      orderNo: {
        required: true,
        type: String
      },
      chargeId: {
        required: true,
        type: Number
      }
    },
    data() {
      return {
        sysInfo: null,
        sfInfo: null,
        blInfo: null,
        queryTime: null
      }
    },
    created() {
      this.$modal.loading()
      if (this.chargeId) {
        report(this.chargeId).then(res => {
          if (res.code == 200) {
            this.sysInfo = res.data.sys
            this.sfInfo = res.data.sf
            this.blInfo = res.data.bl
          }
        }).finally(
          this.$modal.closeLoading()
        )
      }
    }
  }
</script>

